/* tslint:disable */
/* eslint-disable */
/**
 * Admin.NET 通用权限开发平台
 * 让 .NET 开发更简单、更通用、更流行。整合最新技术，模块插件式开发，前后端分离，开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！</font></b></u>
 *
 * OpenAPI spec version: 1.0.0
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
import { WarehousePageInput, WarehouseOutput } from '../models/warehouse-page-input';

import { DeviceMaintenance,DeleteDeviceMaintenance} from '../models/warehous-devicemaintenance -input'
import {  DeviceMaintenancePageInput} from '../models/warehous-devicemaintenance -page-input.'
import { AdminResultWarehouse } from '../models/result-pagelist-warehouse';
import { serveConfig } from '../../utils/axios-utils';

// Some imports not used depending on template conditions
// @ts-ignore


const BaseUrl=(window as any).__env__.VITE_API_URL
import { axiosInstance } from '/@/utils/axios-utils' 

interface ResponseDate<T=any>{
    code:string,
    message:string,
    result:T
  }
  
/** 
 * 获取数据步骤
 * @param 
 * @returns 导入文件操作的响应结果
 */
export function GetMaintenanceApi(formData:DeviceMaintenancePageInput) {
  return axiosInstance<ResponseDate>({
    //responseType: 'blob',
    url: BaseUrl + '/api/Maintenance/GetMaintenancePageList',
    method: 'POST',
    data: formData
  });
}
/** 
 * 添加
 * @param 
 * @returns 导入文件操作的响应结果
 */
export function InsertMaintenanceApi(formData:DeviceMaintenance) {
  return axiosInstance<ResponseDate>({
    //responseType: 'blob',
    url: BaseUrl + '/api/Maintenance/InsertMaintenance',
    method: 'POST',
    data: formData
  });
}
/** 
 * 修改数据
 * @param 
 * @returns 导入文件操作的响应结果
 */
export function UpdateMaintenanceApi(formData:DeviceMaintenance) {
  return axiosInstance<ResponseDate>({
    //responseType: 'blob',
    url: BaseUrl + '/api/Maintenance/UpdateMaintenance',
    method: 'POST',
    data: formData
  });
}
/** 
 * 导入文件操作
 * @param file 导入的文件对象
 * @returns 导入文件操作的响应结果
 */
export function MaintenanceinportApi(formData:any) {
  return axiosInstance<ResponseDate>({
    //responseType: 'blob',
    url: BaseUrl + '/api/Maintenance/ImportMaintenance',
    method: 'POST',
    data: formData
  });
}

/** 
 * 下载接口
 * @param data 下载所需参数
 * @returns 下载文件的响应
 */
export function DownloadMaintenanceApi(params?: Record<string, any>)  {
    return axiosInstance<Blob>({
      responseType: 'blob',
      url: BaseUrl + '/api/Maintenance/DownloadMaintenance',
      method: 'GET',
      params
    });
  }
 /**
  * 批量删除
  * @param data 
  * @returns 
  */
 export function BatchDeleteMaintenanceApi(data:any[])  {
  return axiosInstance<ResponseDate>({
   // responseType: 'blob',
    url: BaseUrl + '/api/Maintenance/BatchDeleteMaintenance',
    method: 'Delete',
    data
  });
}

  /** 
   * 导出
   * @param data 导出条件
   * @param responseType 返回类型
   * @returns 导出文件
   */
  export function MaintenanceexportApi(data:any)
  {
  // 根据调用方式修改请求配置，添加 responseType 为 'blob'
  return axiosInstance<Blob>({
    responseType: 'blob',
      url: BaseUrl+'/api/Maintenance/MaintenanceExcel',
      method: 'POST',
      data
    })
  }
  